<?php
class Macys_Oauth_Authenticate_Token extends Macys_Oauth_Authenticate_BaseAuth {
	
	protected $_access_token;
	// Macys Response after login
	protected $_response;
	
	protected $_auth_endpoint = '/authorize';
	//protected $_auth_endpoint = '/v2/oauth2/authorize';
	
	/**
	 * This class uses Token Flow Hence It will not receive Refresh token
	 * @see Macys_Oauth_Authenticate_BaseAuth::setAuthType()
	 */
	protected function setAuthType($type='token') {
		$this->_authType = 'token';
	}
	
	
	public function setAccessToken($token) {
		$this->_access_token = $token;
		return $this;
	}
	
	public function setResponseParams($params) {
		$this->_response = $params;
	}
	
	public function authenticate() {
		// Sets the Zend_Auth Params
		$result = $this->setAuthentication($this->_response);

		return $result;
	}
	
}